#ifndef PACKETBASETESTER_H
#define PACKETBASETESTER_H

#include "packetbase.h"
#include "udpclient.h"
#include "udpserver.h"

#include <QFile>
#include <QDebug>
#include <QObject>

class PacketBaseTester: public QObject
{
    Q_OBJECT
public:
    PacketBaseTester(QObject *parent = nullptr);

    PacketBase packet;

    bool readFromFile(QString path);
    void encodePacket();
    void decodePacket();

    void sendPacket();

private:
    QByteArray data;

    UdpClient *client;
    UdpServer *server;
};

#endif // PACKETBASETESTER_H
